import type { IPage } from '@/types'
import request from '@/utils/https'

export function getListByPage(data: IPage) {
  return request<any[]>({
    url: '/exam/list',
    method: 'post',
    data
  })
}

export function getQuestions(id) {
  return request<any[]>({
    url: `/examQuestionList/${id}`,
    method: 'post'
  })
}

export function saveExam(data: any) {
  return request<any>({
    url: '/exam/add',
    method: 'post',
    data
  })
}
